package First;

import java.sql.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import static javax.swing.JFrame.EXIT_ON_CLOSE;
import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;

public class Change {
    public Change(){
        JFrame jframe = new JFrame("信息修改端") ; //window
        Dimension d = new Dimension(400,300);
        Point p = new Point (400,350);

        jframe.setSize(d);
        jframe.setLocation(p);
        jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jframe.setVisible(true);

        JButton button1 = new JButton("修改学生信息");
        JButton button2 = new JButton("修改学生成绩");

        FlowLayout flow = new FlowLayout(FlowLayout.LEFT,80,50);
        JPanel panel = new JPanel(flow);
        panel.add(button1);
        panel.add(button2);

        jframe.add(panel);

        button1.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e){
                Change1 change1 = new Change1();
            }
        });

        button2.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e){
                Change2 chang2 = new Change2();
            }
        });

        jframe.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }
}